<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
    <div id="app">
        我叫{{obj.name}},今年{{obj.age}}岁
    </div>
    <script>
        Vue.createApp({
            //reactive只能操作对象,其他的不能操作,ref则使用更广泛,两个函数操作都一样.
            setup() {
                
                const obj = Vue.reactive({
                    name: '张三',  
                    age: 19
                })
                return { obj }
            }
        }).mount('#app')



        
    </script>
</body>

</html>